﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Domain.PlcBytesObject
{
    public abstract class BytesObjectBase
    {
        public long PlcConnectionID { get; set; }

        public long PlcReadDbID { get; set; }

        public int BytesIndex { get; set; }

        public int BytesLength { get; set; }

        public int ObjectIndex { get; set; }

        public int ObjectLength { get; set; }

        /// <summary>
        /// 约定：
        /// 1、设备状态报文以State结尾；
        /// 2、Plc的动作报文以PlcAction结尾；
        /// 3、Wcs的动作报文以WcsAction结尾；
        /// 4、平面PLC报文统一PlcState名称
        /// （后续有其他的再约定）
        /// </summary>
        public string ObjectType { get; set; }

        public string EquipmentCode { get; set; }

        public abstract void Serialize(long plcConnectionID, long plcReadDbID,int bytesIndex, int bytesLength,int objectIndex,int objectLength, string objectType,string ScEquipmentCode, byte[] bytes);

        //public abstract byte[] Derialize();



    }
}
